/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * InternalFrameAddProduto.java
 *
 * Created on 26/01/2012, 13:54:12
 */
package gui.frames.internos;

import controle.gui.frames.internos.ControleBoletimTratamento;
import controle.gui.frames.internos.ControleVisitaTratamento;
import controle.gui.superclasses.InternalFrame;
import gui.componentes.JTextFieldCodigo;
import modelo.Boletimtratamento;

/**
 *
 * @author Administrador
 */
public class IFVisitaTratamento extends InternalFrame {

    private ControleVisitaTratamento controle = null;

    // Creates new form InternalFrameAddProduto
    public IFVisitaTratamento(ControleBoletimTratamento controleBoletim, Boletimtratamento boletim, boolean boletimAtivo) {
        controle = new ControleVisitaTratamento(this, controleBoletim, boletim, boletimAtivo);
        initComponents();
        this.inicializa();
    }

    @Override
    public void inicializa() {
        controle.inicializa();

    }

    public void exibirVisita() {
        controle.preencheGUI();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        groupPendencia = new javax.swing.ButtonGroup();
        groupLarvicida = new javax.swing.ButtonGroup();
        groupAdulticida = new javax.swing.ButtonGroup();
        panelInformações = new javax.swing.JPanel();
        labelIdVisita = new javax.swing.JLabel();
        textIdVisita = new javax.swing.JTextField();
        labelBoletim = new javax.swing.JLabel();
        textIdBoletim = new javax.swing.JTextField();
        labelQuadra = new javax.swing.JLabel();
        labelLogradouro = new javax.swing.JLabel();
        labelImovel = new javax.swing.JLabel();
        labelHora = new javax.swing.JLabel();
        panelPendencias = new javax.swing.JPanel();
        radioRecusada = new javax.swing.JRadioButton();
        radioFechada = new javax.swing.JRadioButton();
        radioResgatada = new javax.swing.JRadioButton();
        radioNenhuma = new javax.swing.JRadioButton();
        comboQuadra = new javax.swing.JComboBox();
        textCodigoQuadra = new javax.swing.JTextField();
        comboLogradouro = new javax.swing.JComboBox();
        textIdLogradouro = new javax.swing.JTextField();
        comboImovel = new javax.swing.JComboBox();
        textIdImovel = new javax.swing.JTextField();
        textHora = new javax.swing.JTextField();
        panelInseticidas = new javax.swing.JPanel();
        radioAdulticidaNovoPacote = new javax.swing.JRadioButton();
        radioAdulticidaNaoUsado = new javax.swing.JRadioButton();
        radioAdulticidaPacoteUsado = new javax.swing.JRadioButton();
        panelInseticidas1 = new javax.swing.JPanel();
        radioLarvicidaNaoUsado = new javax.swing.JRadioButton();
        radioLarvicidaPacoteUsado = new javax.swing.JRadioButton();
        radioLarvicidaNovoPacote = new javax.swing.JRadioButton();
        jPanel1 = new javax.swing.JPanel();
        labelTipoUnidade = new javax.swing.JLabel();
        comboTipoUnidade = new javax.swing.JComboBox();
        labelDepTratados = new javax.swing.JLabel();
        textDepTratados = new JTextFieldCodigo(2, true);
        checkQuartConcluido = new javax.swing.JCheckBox();
        checkUltimaVisitaBoletim = new javax.swing.JCheckBox();
        panelOpções = new javax.swing.JPanel();
        buttonCancelar = new javax.swing.JButton();
        buttonOk = new javax.swing.JButton();
        buttonLimpar = new javax.swing.JButton();

        setClosable(true);
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Visita de Tratamento");

        panelInformações.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informações da Visita", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        labelIdVisita.setText("Id da Visita:");

        textIdVisita.setEnabled(false);

        labelBoletim.setText("Id Boletim:");

        textIdBoletim.setEnabled(false);

        labelQuadra.setText("Quadra:");

        labelLogradouro.setText("Logradouro:");

        labelImovel.setText("Imóvel:");

        labelHora.setText("Hora:");

        panelPendencias.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Pendências:", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        groupPendencia.add(radioRecusada);
        radioRecusada.setText("Recusada");
        radioRecusada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioRecusadaActionPerformed(evt);
            }
        });

        groupPendencia.add(radioFechada);
        radioFechada.setText("Fechada");
        radioFechada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioFechadaActionPerformed(evt);
            }
        });

        groupPendencia.add(radioResgatada);
        radioResgatada.setText("Resgatada");
        radioResgatada.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioResgatadaActionPerformed(evt);
            }
        });

        groupPendencia.add(radioNenhuma);
        radioNenhuma.setSelected(true);
        radioNenhuma.setText("Nenhuma");
        radioNenhuma.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioNenhumaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelPendenciasLayout = new javax.swing.GroupLayout(panelPendencias);
        panelPendencias.setLayout(panelPendenciasLayout);
        panelPendenciasLayout.setHorizontalGroup(
            panelPendenciasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPendenciasLayout.createSequentialGroup()
                .addGroup(panelPendenciasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(radioRecusada)
                    .addComponent(radioFechada)
                    .addComponent(radioResgatada)
                    .addComponent(radioNenhuma))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelPendenciasLayout.setVerticalGroup(
            panelPendenciasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPendenciasLayout.createSequentialGroup()
                .addComponent(radioRecusada)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioFechada)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioResgatada)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioNenhuma)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        comboQuadra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboQuadraActionPerformed(evt);
            }
        });

        textCodigoQuadra.setEnabled(false);

        comboLogradouro.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione..." }));
        comboLogradouro.setEnabled(false);
        comboLogradouro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboLogradouroActionPerformed(evt);
            }
        });

        textIdLogradouro.setEnabled(false);

        comboImovel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione..." }));
        comboImovel.setEnabled(false);

        textIdImovel.setEnabled(false);

        textHora.setEnabled(false);
        textHora.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textHoraActionPerformed(evt);
            }
        });

        panelInseticidas.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Adulticida:", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        groupAdulticida.add(radioAdulticidaNovoPacote);
        radioAdulticidaNovoPacote.setText("Novo Pacote");
        radioAdulticidaNovoPacote.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioAdulticidaNovoPacoteActionPerformed(evt);
            }
        });

        groupAdulticida.add(radioAdulticidaNaoUsado);
        radioAdulticidaNaoUsado.setSelected(true);
        radioAdulticidaNaoUsado.setText("Não Usado");

        groupAdulticida.add(radioAdulticidaPacoteUsado);
        radioAdulticidaPacoteUsado.setText("Pacote Usado");

        javax.swing.GroupLayout panelInseticidasLayout = new javax.swing.GroupLayout(panelInseticidas);
        panelInseticidas.setLayout(panelInseticidasLayout);
        panelInseticidasLayout.setHorizontalGroup(
            panelInseticidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInseticidasLayout.createSequentialGroup()
                .addGroup(panelInseticidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInseticidasLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(radioAdulticidaPacoteUsado))
                    .addGroup(panelInseticidasLayout.createSequentialGroup()
                        .addGroup(panelInseticidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(radioAdulticidaNaoUsado)
                            .addComponent(radioAdulticidaNovoPacote))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        panelInseticidasLayout.setVerticalGroup(
            panelInseticidasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInseticidasLayout.createSequentialGroup()
                .addComponent(radioAdulticidaNaoUsado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioAdulticidaPacoteUsado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioAdulticidaNovoPacote)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelInseticidas1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Larvicida:", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        groupLarvicida.add(radioLarvicidaNaoUsado);
        radioLarvicidaNaoUsado.setSelected(true);
        radioLarvicidaNaoUsado.setText("Não Usado");

        groupLarvicida.add(radioLarvicidaPacoteUsado);
        radioLarvicidaPacoteUsado.setText("Pacote Usado");

        groupLarvicida.add(radioLarvicidaNovoPacote);
        radioLarvicidaNovoPacote.setText("Novo Pacote");
        radioLarvicidaNovoPacote.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioLarvicidaNovoPacoteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelInseticidas1Layout = new javax.swing.GroupLayout(panelInseticidas1);
        panelInseticidas1.setLayout(panelInseticidas1Layout);
        panelInseticidas1Layout.setHorizontalGroup(
            panelInseticidas1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInseticidas1Layout.createSequentialGroup()
                .addGroup(panelInseticidas1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(radioLarvicidaNaoUsado)
                    .addComponent(radioLarvicidaPacoteUsado)
                    .addComponent(radioLarvicidaNovoPacote))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelInseticidas1Layout.setVerticalGroup(
            panelInseticidas1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInseticidas1Layout.createSequentialGroup()
                .addComponent(radioLarvicidaNaoUsado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioLarvicidaPacoteUsado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioLarvicidaNovoPacote)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informações", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        labelTipoUnidade.setText("Tipo Unidade:");

        comboTipoUnidade.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Selecione...", "Residencial", "Comercial", "Terreno Baldio", "Ponto Estratégico", "Outros" }));

        labelDepTratados.setText("Dep. Tratados:");

        textDepTratados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                textDepTratadosActionPerformed(evt);
            }
        });

        checkQuartConcluido.setText("Quarteirão Concluído");
        checkQuartConcluido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkQuartConcluidoActionPerformed(evt);
            }
        });

        checkUltimaVisitaBoletim.setText("Última Visita Boletim");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelDepTratados)
                    .addComponent(labelTipoUnidade))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(textDepTratados, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboTipoUnidade, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addComponent(checkQuartConcluido)
            .addComponent(checkUltimaVisitaBoletim)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelTipoUnidade)
                    .addComponent(comboTipoUnidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(8, 8, 8)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelDepTratados)
                    .addComponent(textDepTratados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(checkQuartConcluido)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(checkUltimaVisitaBoletim)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout panelInformaçõesLayout = new javax.swing.GroupLayout(panelInformações);
        panelInformações.setLayout(panelInformaçõesLayout);
        panelInformaçõesLayout.setHorizontalGroup(
            panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInformaçõesLayout.createSequentialGroup()
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(panelInformaçõesLayout.createSequentialGroup()
                        .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelIdVisita)
                            .addComponent(labelQuadra)
                            .addComponent(labelLogradouro)
                            .addComponent(labelImovel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(panelInformaçõesLayout.createSequentialGroup()
                                .addComponent(textIdVisita, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(labelBoletim)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(textIdBoletim, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(labelHora)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(textHora, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(panelInformaçõesLayout.createSequentialGroup()
                                .addComponent(textCodigoQuadra, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(comboQuadra, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(panelInformaçõesLayout.createSequentialGroup()
                                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(textIdImovel, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)
                                    .addComponent(textIdLogradouro))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboLogradouro, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(comboImovel, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                    .addGroup(panelInformaçõesLayout.createSequentialGroup()
                        .addComponent(panelInseticidas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(panelInseticidas1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(panelPendencias, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, 0))
        );
        panelInformaçõesLayout.setVerticalGroup(
            panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInformaçõesLayout.createSequentialGroup()
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelIdVisita)
                    .addComponent(textIdVisita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelBoletim)
                    .addComponent(textIdBoletim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelHora)
                    .addComponent(textHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelQuadra)
                    .addComponent(comboQuadra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textCodigoQuadra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelLogradouro)
                    .addComponent(comboLogradouro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textIdLogradouro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(6, 6, 6)
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelImovel)
                    .addComponent(comboImovel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textIdImovel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelInformaçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelPendencias, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelInseticidas1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelInseticidas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        panelOpções.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Opções", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        buttonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Cancelar.png"))); // NOI18N
        buttonCancelar.setText("Cancelar");
        buttonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonCancelarActionPerformed(evt);
            }
        });

        buttonOk.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Confirma.png"))); // NOI18N
        buttonOk.setText("Ok");
        buttonOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonOkActionPerformed(evt);
            }
        });

        buttonLimpar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/Novo.png"))); // NOI18N
        buttonLimpar.setText("Nova/Limpar");
        buttonLimpar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonLimparActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelOpçõesLayout = new javax.swing.GroupLayout(panelOpções);
        panelOpções.setLayout(panelOpçõesLayout);
        panelOpçõesLayout.setHorizontalGroup(
            panelOpçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpçõesLayout.createSequentialGroup()
                .addComponent(buttonOk)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonLimpar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(buttonCancelar)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelOpçõesLayout.setVerticalGroup(
            panelOpçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelOpçõesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(buttonOk)
                .addComponent(buttonCancelar)
                .addComponent(buttonLimpar))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelOpções, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(panelInformações, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelInformações, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(panelOpções, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, 0))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    @Override
    public void buttonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCancelarActionPerformed
        this.dispose();
    }//GEN-LAST:event_buttonCancelarActionPerformed

    private void buttonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOkActionPerformed
        controle.inserirAlterarLinha();
    }//GEN-LAST:event_buttonOkActionPerformed

    @Override
    public void buttonLimparActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonLimparActionPerformed
        controle.limparGUI();
    }//GEN-LAST:event_buttonLimparActionPerformed

    private void textHoraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textHoraActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textHoraActionPerformed

    private void textDepTratadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_textDepTratadosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_textDepTratadosActionPerformed

    private void radioNenhumaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioNenhumaActionPerformed
        controle.eventoPendencias();
    }//GEN-LAST:event_radioNenhumaActionPerformed

    private void comboLogradouroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboLogradouroActionPerformed
        controle.comboBoxLogradouroCarregaComboBoxImovel();
    }//GEN-LAST:event_comboLogradouroActionPerformed

    private void comboQuadraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboQuadraActionPerformed
        controle.eventoComboBoxQuadra(comboQuadra, comboLogradouro, comboImovel);
    }//GEN-LAST:event_comboQuadraActionPerformed

    private void radioAdulticidaNovoPacoteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioAdulticidaNovoPacoteActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_radioAdulticidaNovoPacoteActionPerformed

    private void radioLarvicidaNovoPacoteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioLarvicidaNovoPacoteActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_radioLarvicidaNovoPacoteActionPerformed

    private void radioRecusadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioRecusadaActionPerformed
        controle.eventoPendencias();
    }//GEN-LAST:event_radioRecusadaActionPerformed

    private void radioFechadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioFechadaActionPerformed
        controle.eventoPendencias();
    }//GEN-LAST:event_radioFechadaActionPerformed

    private void radioResgatadaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioResgatadaActionPerformed
        controle.eventoPendencias();
    }//GEN-LAST:event_radioResgatadaActionPerformed

    private void checkQuartConcluidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkQuartConcluidoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_checkQuartConcluidoActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton buttonCancelar;
    public javax.swing.JButton buttonLimpar;
    public javax.swing.JButton buttonOk;
    public javax.swing.JCheckBox checkQuartConcluido;
    public javax.swing.JCheckBox checkUltimaVisitaBoletim;
    public javax.swing.JComboBox comboImovel;
    public javax.swing.JComboBox comboLogradouro;
    public javax.swing.JComboBox comboQuadra;
    public javax.swing.JComboBox comboTipoUnidade;
    private javax.swing.ButtonGroup groupAdulticida;
    private javax.swing.ButtonGroup groupLarvicida;
    public javax.swing.ButtonGroup groupPendencia;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel labelBoletim;
    private javax.swing.JLabel labelDepTratados;
    private javax.swing.JLabel labelHora;
    private javax.swing.JLabel labelIdVisita;
    private javax.swing.JLabel labelImovel;
    private javax.swing.JLabel labelLogradouro;
    private javax.swing.JLabel labelQuadra;
    private javax.swing.JLabel labelTipoUnidade;
    private javax.swing.JPanel panelInformações;
    private javax.swing.JPanel panelInseticidas;
    private javax.swing.JPanel panelInseticidas1;
    private javax.swing.JPanel panelOpções;
    private javax.swing.JPanel panelPendencias;
    public javax.swing.JRadioButton radioAdulticidaNaoUsado;
    public javax.swing.JRadioButton radioAdulticidaNovoPacote;
    public javax.swing.JRadioButton radioAdulticidaPacoteUsado;
    public javax.swing.JRadioButton radioFechada;
    public javax.swing.JRadioButton radioLarvicidaNaoUsado;
    public javax.swing.JRadioButton radioLarvicidaNovoPacote;
    public javax.swing.JRadioButton radioLarvicidaPacoteUsado;
    public javax.swing.JRadioButton radioNenhuma;
    public javax.swing.JRadioButton radioRecusada;
    public javax.swing.JRadioButton radioResgatada;
    public javax.swing.JTextField textCodigoQuadra;
    public javax.swing.JTextField textDepTratados;
    public javax.swing.JTextField textHora;
    public javax.swing.JTextField textIdBoletim;
    public javax.swing.JTextField textIdImovel;
    public javax.swing.JTextField textIdLogradouro;
    public javax.swing.JTextField textIdVisita;
    // End of variables declaration//GEN-END:variables

    public void modelo(Object[] object) {
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
